package javaRew;

/**
 * Created by xjweng on 2017/2/1.
 */
public class Account {
    //初始化id
    private static int initId = 1000;

    private String id;
    private String password;
    private int balance;
    private static double rate;
    private static int minBalance;

    public Account(String password, int balance){
        this.id = "" + (initId++);
        this.password = password;
        this.balance = balance;
    }
    public String getId() {
        return id;
    }

    public String getPassword() {
        return password;
    }

    public int getBalance() {
        return balance;
    }

    public static double getRate() {
        return rate;
    }

    public static int getMinBalance() {
        return minBalance;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public static void setRate(double rate) {
        Account.rate = rate;
    }

    public static void setMinBalance(int minBalance) {
        Account.minBalance = minBalance;
    }

    @Override
    public String toString() {
        return "id: " + this.id + " password: " + this.password + " balance: " + this.balance +
                " rate: " + Account.rate + " minBalance: " + Account.minBalance;
    }
}
